package com.itheima.demo6;

import java.util.concurrent.ArrayBlockingQueue;

public class ThreadDemo7 {
    public static void main(String[] args) {

        //创建堵塞队列
        ArrayBlockingQueue<String> queue = new ArrayBlockingQueue<>(1);

        //创建线程对象
        Cook2 cook2 = new Cook2(queue);
        Foodie2 foodie2 = new Foodie2(queue);

        cook2.start();
        foodie2.start();

    }
}
